package com.qiwenshare.file.controller;

import com.qiwenshare.common.result.RestResult;
import com.qiwenshare.file.domain.Job;
import com.qiwenshare.file.api.JobService;
import com.qiwenshare.file.vo.department.DepartmentTreeVo;
import com.qiwenshare.file.vo.job.JobTreeVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


/**
 * 职位表(Job)表控制层
 *
 * @author makejava
 * @since 2023-09-25 19:45:38
 */
@RestController
@RequestMapping("job")
public class JobController{
    /**
     * 服务对象
     */
    @Resource
    private JobService jobService;

    public static final String CURRENT_MODULE = "职位管理";

    /**
     * 得到所有的职位
     *
     * @return
     */
    @Operation(summary = "得到所有的职位列表", description = "得到所有的职位列表", tags = {"职位管理"})
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public RestResult<List<JobTreeVo>> selectJobTree() {
        return RestResult.success().data(jobService.selectJobTree());
    }
}

